import { postRequestData, postRequestJson, postRequestList } from '../utils/request'

export const exportTagMonitorInfo = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/monitor/tag/exportTagMonitorInfo`, data)
export const getArrivalTrackingList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/dashboards/arrivalTracking`, data)
export const exportArrivalTrackingExcel = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/dashboards/exportArrivalTracking`, data)
export const countArrivalTracking = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/dashboards/countArrivalTracking`, data)
export const getQuotationTrackList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/dashboards/quotationTrack`, data)
export const getTimeAchieveDashboard = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestData(`/api/sop/sop/dashboardTimeAchieveSettings/getTimeAchieveDashboard`, data, { timeout: 60000 })

export const getNewArrivalSpeedListByClassId = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestData(`/api/sop/sop/dashboardTimeAchieveSettings/summaryNewArrivalSpeed`, data, { timeout: 60000 })

export const getSummarySupplementSpeedListByClassId = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestData(`/api/sop/sop/dashboardTimeAchieveSettings/summarySupplementSpeed`, data, { timeout: 60000 })

export const getSummaryReorderSpeedListByClassId = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestData(`/api/sop/sop/dashboardTimeAchieveSettings/summaryReorderSpeed`, data, { timeout: 60000 })

export const getNewArrivalSpeedListBySpu = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/dashboardTimeAchieveSettings/pageNewArrivalSpeed`, data, { timeout: 60000 })

export const getSummarySupplementSpeedListBySpu = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/dashboardTimeAchieveSettings/pageSupplementSpeed`, data, { timeout: 60000 })

export const getSummaryReorderSpeedListBySpu = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/dashboardTimeAchieveSettings/pageReorderSpeed`, data, { timeout: 60000 })
